<%@ page language="java" contentType="text/html; charset=UTF-8"%>


<!---------------------------------------头部模块复用------------------------------------------>
<%@ include file="/res/FrontPage/PartialPageReferences/head.jsp" %>

<title>跨账户转账</title>

<!-- -----------------------------------正文开始--------------------------------------- -->
<% if(session.getAttribute("users") == null){ %>
<script type="text/javascript">
	alert("请先登录哦~~~");
	window.location="/Bank/WebPage/FrontPage/index.jsp";
</script>
<%}else{ %>
<section class="contact_page">
    <div class="container">
        <div class="row">
            <div class="col-sm-6 col-sm-offset-3 m-t-50">
                <h2 class="underline heading">跨账户转账服务</h2>
                <p class="text-center">日常生活中，转账的功能也是必不可少的。</p>
            </div>
        </div>

        <div class="row">
        	
        	<!-- -------------------------------------------------------转账功能开始------------------------------------------ -->
			<div class="col-xs-12 col-sm-6 section-top-30 wow fadeInRight" data-wow-duration="1s" data-wow-delay="0.2s">

                <div class="row contact_border">

                    <div class="contact_form">

                        <form class="form" action="TransferAccounts.do" method="post">
                            <div class="col-xs-12"><h4 class="heading_left">账号余额：<%=((Users)session.getAttribute("users")).getYue()%>
                            </h4></div>
                            <div class="form-group col-xs-12 section-top-10">
                                <input id="zhuanzhangzhanghao" type="text" class="form-control" name="zhanghao" placeholder="请输入转账人的账号" required>
                            </div>
                            <div class="form-group col-xs-12 section-top-10">
                                <input id="zhuanzhangjine" type="text" class="form-control" name="jine" placeholder="请输入转账的金额" required>
                            </div>
                            <div class="clearfix visible-sm-block visible-md-block visible-xs-block"></div>
                            <div class="col-md-12 text-center section-bottom-15">
                                <button type="submit" class="btn btn-success">确认转账</button>
                            </div>
                        </form>
                        
                    </div>
                </div>
                <!-- -------------------------------------------------------存取款功能结束------------------------------------------ -->
            
            
                <!-- -------------------------------------------------------近期存取记录开始------------------------------------------ -->
                <div class="col-xs-12 col-sm-6 section-top-30 wow fadeInRight" data-wow-duration="1s" data-wow-delay="0.2s">
                    <div class="row contact_border">
                        <div class="contact_form">
                            <div class="form">
                                <div class="col-xs-12"><h4 class="heading_left">近期转账的人</h4></div>
                                <div class="clearfix visible-sm-block visible-md-block visible-xs-block"></div>
                                <table border=’1’ cellspacing=’0’ cellpadding=’5’ class="table table-striped table-bordered table-hover table-condensed">
                                    <tr><th align="center"> 转账账号 </th><th align="center"> 转账人姓名 </th><th align="center"> 操作 </th></tr>
                                    <%
                                        DAO dao = new DAO();
                                        String sqlyujv = "select * from users";
                                        ArrayList<Users> list;
                                        Users users = new Users();
                                        list = dao.chaxun(sqlyujv); //查询账号密码对应的详细信息
                                        int i = 0;
                                    %>
                                    <% for(Users user : list){ //将信息存在user里面 %>
                                    <% i++; %>
                                    <tr><td align="center" valign="center"><%= user.getZhanghao() %></td><td align="center" valign="center"><%= user.getXingming() %></td></td><td align="center" valign="center"><button class="btn btn-success">快速转账</button></td></tr>
                                    <% //if(i>=10) break; %>
                                    <% } %>
                                </table>
                                <div class="col-xs-12"><h4 class="heading_left"> </h4></div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        
            <div class="row section-top-25">
                <div class="col-xs-12">
                    <div class="map"></div>
                </div>
            </div>
        </div>
    </div>
</section>
<%} %>
<!-- -----------------------------------正文结束--------------------------------------- -->

<!------------尾部顶端的两个角------------>
<div class="shape section-top-50"></div>
<!-----------------------------尾部页面复用------------------------------------->

<%@ include file="/res/FrontPage/PartialPageReferences/foot.jsp" %>